package jdbc;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class jdbcdemo11
{
    public static void main(String[] args)
    {
        try(Connection con=DButil.getConnection();)
        {
            con.setAutoCommit(false);
            con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
            String sql="UPDATA USER SET PASSWORD=? WHERE USERNAME=?";
            PreparedStatement ps=con.prepareStatement(sql);
            ps.setString(1,"654456");
            ps.setString(2,"JOJO");
            int count=ps.executeUpdate();
            con.commit();

        } catch (SQLException e) {e.printStackTrace();}
    }
}
